﻿@{
    ViewBag.Title = "新增";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script>
    function sub() {
        if ($("#datanodepartition").val() == "") {
            alert("请填写节点")
            return false;
        }
        if ($("#serverip").val() == "") {
            alert("请填写ip");
            return false;
        }
        if ($("#username").val() == "") {
            alert("请填写用户名");
            return false;
        }
        if ($("#password").val() == "") {
            alert("请填写密码");
            return false;
        }
    }
</script>
<div class="head">
    <div class="title">
        新增节点 @Html.Raw(Dyd.BusinessMQ.Web.Base.CommonHelper.Help(@"先用数据库中增加数据节点库后,再在管理平台中增加!"))
    </div>
</div>
<div>
    @using (Html.BeginForm("Add", "Node", FormMethod.Post, new { enctype = "multipart/form-data", @onsubmit = "return sub()" }))
    {
    <ul class="mydetail">
        <li>
            <label>节点编号</label>@*<input  type="text" id="datanodepartition" name="datanodepartition" />（不可重复 01~99之间）*@
            <select id="datanodepartition" name="datanodepartition">
                @foreach (var o in ViewBag.unusednodes)
                {
                   <option value="@o">@o</option> 
                }
            </select>
        </li>
        <li> 
            <label>IP</label><input type="text" id="serverip" name="serverip" />
        </li>
        <li>
            <label>用户名</label><input type="text" id="username" name="username" />
        </li>
         <li>
            <label>密码</label><input type="text" id="password" name="password" />
        </li>
        <li>
            <input type="submit" class="btn1" value="提交" />@Html.ValidationMessage("Error")
        </li>
    </ul>
    }
</div>
